<script setup lang="ts">
defineProps<{
  collapsed?: boolean
}>()
</script>

<template>
  <div class="logo">
    <img src="@/assets/logo.png" alt="logo" />
    <div class="title" :class="{ collapsed }">
      <h1>文件收集系统</h1>
    </div>
  </div>
</template>

<style lang="less" scoped>
.logo {
  height: 64px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #001529; // 与 Sider 背景色保持一致
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  img {
    width: 32px;
    height: 32px;
    min-width: 32px;
    filter: brightness(1.2); // 让 logo 更亮一些
  }

  .title {
    margin-left: 12px;
    overflow: hidden;
    opacity: 1;
    transition: all 0.2s ease;
    white-space: nowrap;
    
    &.collapsed {
      width: 0;
      opacity: 0;
      margin-left: 0;
    }

    h1 {
      margin: 0;
      color: white;
      font-size: 18px;
      font-weight: 600;
      line-height: 32px;
      opacity: 0.95;
    }
  }
}
</style> 